package com.lucker.ds.model;

/**
 * recommend_algorithm
 * @author 
 */
public class RecommendAlgorithm extends BaseValueObject {
    private Long id;

    /**
     * 推荐算法ID
     */
    private Long recommendAlgorithmId;

    /**
     * 推荐算法名称
     */
    private String recommendAlgorithmName;

    /**
     * 推荐算法LOGO
     */
    private String recommendAlgorithmPic;

    private String orderStr = null;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getRecommendAlgorithmId() {
        return recommendAlgorithmId;
    }

    public void setRecommendAlgorithmId(Long recommendAlgorithmId) {
        this.recommendAlgorithmId = recommendAlgorithmId;
    }

    public String getRecommendAlgorithmName() {
        return recommendAlgorithmName;
    }

    public void setRecommendAlgorithmName(String recommendAlgorithmName) {
        this.recommendAlgorithmName = recommendAlgorithmName;
    }

    public String getRecommendAlgorithmPic() {
        return recommendAlgorithmPic;
    }

    public void setRecommendAlgorithmPic(String recommendAlgorithmPic) {
        this.recommendAlgorithmPic = recommendAlgorithmPic;
    }

    public void orderById(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by id asc";
            }else{
                this.orderStr = this.orderStr + ",id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by id desc";
            }else{
                this.orderStr = this.orderStr + ",id desc";
            }
        }
    }

    public void orderByRecommendAlgorithmId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by recommend_algorithm_id asc";
            }else{
                this.orderStr = this.orderStr + ",recommend_algorithm_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by recommend_algorithm_id desc";
            }else{
                this.orderStr = this.orderStr + ",recommend_algorithm_id desc";
            }
        }
    }

    public void orderByRecommendAlgorithmName(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by recommend_algorithm_name asc";
            }else{
                this.orderStr = this.orderStr + ",recommend_algorithm_name asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by recommend_algorithm_name desc";
            }else{
                this.orderStr = this.orderStr + ",recommend_algorithm_name desc";
            }
        }
    }

    public void orderByRecommendAlgorithmPic(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by recommend_algorithm_pic asc";
            }else{
                this.orderStr = this.orderStr + ",recommend_algorithm_pic asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by recommend_algorithm_pic desc";
            }else{
                this.orderStr = this.orderStr + ",recommend_algorithm_pic desc";
            }
        }
    }
}